package user

import (
	"context"

	"gf-demo/api/user/v1"
	"gf-demo/internal/dao"
	"gf-demo/internal/model/do"
)

func (c *ControllerV1) UpdateUser(ctx context.Context, req *v1.UpdateUserReq) (res *v1.UpdateUserRes, err error) {
	_, err = dao.User.Ctx(ctx).Data(do.User{
		Name:   req.Name,
        Status: req.Status,
        Age:    req.Age,
	}).WherePri(req.Id).Update()

	return
}
